/// 在这里注册所有的response返回类型
use crate::schemas as s;
use crate::schemas::base::{ListResult, ManyEffect, OneEffect, OneResultId};
use serde::{Deserialize, Serialize};

#[derive(Debug, Serialize, Deserialize)]
#[serde(tag = "type", content = "data")]
pub enum Response {
    OneResultId(OneResultId),
    ManyResultId(s::base::ManyResultId),
    NullResult(()),
    ListProject(ListResult<s::project::ListItem>),
    ListAiConfig(ListResult<s::ai::ListItem>),
    ListDatasource(ListResult<s::datasource::ListItem>),
    ProjectEffect(OneEffect<s::project::ListItem>),
    AiConfigEffect(OneEffect<s::ai::ListItem>),
    AiConfigEffectByString(OneResultId),
    DatasourceEffect(OneEffect<s::datasource::ListItem>),
    DsFileEffects(ManyEffect<s::datasource::UpdateFile>),
    DsServeEffects(ManyEffect<s::datasource::UpdateServe>),
    DuckData(s::duck::DuckData),
    DsDesc(Vec<s::datasource::DescriptionItem>),
}
